package com.atcc.test.onlytest;

import java.lang.reflect.Proxy;

import org.springframework.beans.factory.FactoryBean;
import org.springframework.stereotype.Component;

@Component
public class MyFactoryBean implements FactoryBean{
	
	@Override
	public Object getObject() throws Exception {
		Class[] classes = new Class[] {Hello.class};
		return Proxy.newProxyInstance(Hello.class.getClassLoader(), classes, new MyInvocationHandler());
	}
	
	@Override
	public Class getObjectType() {
		return Hello.class;
	}

}
